<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span {
            border: 1px aquamarine solid;
            padding: 5px;
            text-align: center;
            line-height: 30px;
        }
    </style>
</head>

<body>
    <script>

        1
        var sum = 0
        for (i = 1; i <= 100; i += 2) {
            sum += i
        }
        console.log(sum)

        2
        var sum = 0
        for (i = 1; i <= 100; i++) {
            if (i % 2 == 0) {
                sum = sum - (1 / i)
            } else if (i % 2 != 0) {
                sum = sum + (1 / i)
            }
        }
        console.log(sum)

        3
        var s = 0
        for (i = 1000; i <= 2000; i++) {
            if (i % 400 == 0 || i % 4 == 0 && i % 100 != 0) {
                document.write('<span>' + i + '</span>')
                s++
                if (s % 4 == 0) {
                    document.write('<br>')
                }
            }
        }

        4
        for (i = 1; i <= 5; i++) {
            for (s = 1; s <= 5; s++) {
                document.write('*')
            }
            document.write('<br>')
        }

        5
        for (i = 1; i <= 5; i++) {
            for (s = 1; s <= i; s++) {
                document.write('*')
            }
            document.write('<br>')
        }

        for (i = 1; i <= 100; i++) {
            for (j = 1; j <= i; j++) {
                if (i % j != 0){
                    
                }
            }
        }
    </script>
</body>

</html>